import api_address from "./api_address";
import axios from 'axios'

// 搜索页热词
export const hotText = () => {
    return axios.get(api_address.search.hotText)
}

// 搜索关键词
export const searchText = (data) => {
    return axios.get(api_address.search.searchText, { params: data })
}

// 首页所有渲染内容
export const homeAll = () => {
    return axios.get(api_address.homeApi.homeAll)
}

// 首页加载更多
export const loadMore = (data) => {
    return axios.get(api_address.homeApi.loadMore, { params: data })
}

// 搜索出来的关键词点击进去页面内容请求
export const searchNew = (data) => {
    return axios.get(api_address.search.searchNew, { params: data })
}

// 分类图标点击进去后渲染分类数据
export const HomeClass = (data) => {
    return axios.get(api_address.HomeClass.ClassList, {
        params: data,
        // 要带这个请求头 不然请求到的数据不全
        headers: { 'app-version': '3.16.0' },
    })
}

// 分类图标点进去的 二级分类渲染接口
export const ClassTowGrade = (data) => {
    return axios.get(api_address.HomeClass.TwoGrade, {
        params: data,
        headers: { 'app-version': '3.16.0' },
    })
}

// 首页观念日历 点击更多
export const IdeaDate = (data) => {
    return axios.get(api_address.IdeaDateView.IdeaDate, {
        params: data,
    })
}

// 首页每日金句 点击更多
export const DailySentence = (data) => {
    return axios.get(api_address.DailySentenceView.DailySentence, {
        params: data,
    })
}

// 节目详情页
export const BookDetails = (data) => {
    return axios.get(api_address.HomeClass.BookDetails + data)
}

// 节目详情页的简介
export const IntroContent = (data) => {
    return axios.get(api_address.HomeClass.IntroContent, {
        params: data,
    })
}

// 单集页面
export const SingleSetView = (data) => {
    return axios.get(api_address.SingleSetView, {
        params: data,
    })
}

// 评论页面
export const CommentCountPage = (data) => {
    return axios.get(api_address.HomeClass.commentCountPage, {
        params: data,
    })
}

// 作者页面
export const authorPage = (data) => {
    return axios.get(api_address.HomeClass.authorPage, {
        params: data,
    })
}

// 会员页
export const VipView = () => {
    return axios.get(api_address.VipView)
}


// 注册登录页手机号地区数据请求
export const IphoneArea = () => {
    return axios.get(api_address.IphoneArea)
}
